home *** CD-ROM | disk | FTP | other *** search
/ Hacker's Arsenal - The Cutting Edge of Hacking / Hacker's Arsenal - The Cutting Edge of Hacking.iso / texts / misc / shell.txt < prev    next >
Encoding:
Text File  |  2001-07-11  |  14.2 KB  |  381 lines

  1. Shell Accounts For Newbies By:
  2.  
  3. Ghost_Rider (Ghost_Rider9@hotmail.com)
  4.  
  5. http://blacksun.box.sk
  6.  
  7.  
  8. This is a tutorial explaining what a shell account is, how you can get one 
  9. and some basic commands. If you are thinking that you can find here shell 
  10. scripting or exploit hints, you are wrong. Wait for further tutorials.
  11. The first part is just a bunch of questions with answers. After that I'll do 
  12. a quick view about shell flavours and where can you get shells for free.
  13. So here we go.
  14.  
  15.  
  16. ----------------------------------
  17. The Questions That Everybody Asks
  18. ----------------------------------
  19.  
  20.  
  21. Q:What is a shell account?
  22.  
  23. A:Ok...I think I won't be needing to explain what an account is, but let's 
  24. talk about the shell. You probably are using Windows, so your shell is 
  25. command.com and all that cute (crashing) Graphic environment.
  26. Being more precise a shell is the program that translates and sends your 
  27. commands to your system's core. This happens because the core doesn't 
  28. understand the commands you give. For example, when you type "cd ..", this 
  29. command will be first translate to a low language level by the shell and 
  30. just after that, sent to the core (or your CPU would drive mad).
  31. Do you imagine how painful would be using a computer if you hadn't a shell? 
  32. You needed to use a low language level, like assembler or even worst 
  33. (binary) to do something. If you wanted to do "cd .." you would have to 
  34. write a bunch of push mem put mem blabla mem or a huge list of 00101010. Do
  35. you really think that this would work with people? I don't think so. 
  36. Ok..Ok.. There are many persons that code in assembler, but I'm talking 
  37. about ordinary people.
  38.  
  39.  
  40.  
  41. Q:So you are saying that a shell is just a "thing" that translates my inputs 
  42. to the core, like command.com. But why do I want to connect to a remote 
  43. command.com, I've got my own in my box.
  44.  
  45. A: People like Shell Accounts because you don't connect to a Windows box, 
  46. but to a *nix box. If you can't have linux or any other *nix System at home, 
  47. you could get a Shell Account, and start playing with linux like if it was 
  48. in your own box.
  49.  
  50.  
  51.  
  52. Q:My friend is a *nix guru and he told me that some shells suck because they 
  53. are restricted what's that?
  54.  
  55. A:There are two kind of shells, the restricted shells and the non-restricted 
  56. shells. The difference between both is that usually restricted shells aren't 
  57. rented, they are free shells, but in those shells you can't execute every 
  58. command you want (for example, using a free shell they can keep you out of 
  59. dig, nslookup and telnet programs). On the otherhand using non-restricted 
  60. shells, you can run any command you want but these kind of shells are paid 
  61. (sometimes universities give non-restricted shells to the students).
  62. Hey, but even if you have a restricted shell don't be worried, some of them 
  63. are really good.
  64.  
  65.  
  66.  
  67. Q: So you are saying that I can get a shell without paying for it?
  68.  
  69. A: Yes you can. For me the best place is at nether.net (other host that is a 
  70. free shell provider is freeshell.org), I'll guide you through the all 
  71. process later.  Sometimes ISPs also give shell accounts to their users, so 
  72. you may have already a shell account and you don't know, phone to yours 
  73. ISP's Support and talk with them.
  74.  
  75.  
  76.  
  77. Q: I phoned my ISP asking for a shell account, and they asked why did I want 
  78. one. What should I say?
  79.  
  80. A: Just tell that you really love to surf with Lynx, and that you want to 
  81. learn Unix. That should do. If they hang up, just go for the free shells.
  82.  
  83.  
  84.  
  85. Q: Hey I've got a shell, but how can I know if it's a good shell?
  86.  
  87. A: I think the answer is relative, it depends from the person who answer, 
  88. for me the things that make a good shell are listed below.
  89.  
  90. -> Telnet (terminal emulator)
  91. -> Nslookup (Gives you information about the host)
  92. -> FTP (File Transfer Protocol, do I need to say anything else?)
  93. -> Finger (gets information about some user)
  94. -> Traceroute (The same as tracerT.exe in Windows, but much better)
  95. -> Dig (probably many of the restricted shells won't let you use, but don't 
  96. worry)
  97. -> Netstat (like in windows, lists all sockets and their status)
  98. -> GCC (c compiler, cool to do your own coding)
  99. -> Gzip (to [un]pack stuff)
  100. -> Lynx (Best Browser in the World)
  101.  
  102. This doesn't mean that a good shell for you needs to have this. For you a 
  103. good shell could be just a shell that allows you to telnet, like I said it's 
  104. very relative.
  105. But if your shell account doesn't let you use telnet, FTP and GCC, you 
  106. should get other shell account.
  107.  
  108.  
  109. By now you should be getting bored of reading stupid questions, and even 
  110. more stupid answers, so let's get in another section. Let's talk a little 
  111. about the flavours of Shell Accounts.
  112.  
  113.  
  114. -------------------------------------------
  115. Quick View about flavours of Shell Accounts
  116. -------------------------------------------
  117.  
  118. There are may kinds of shell accounts, some of them are what we call home 
  119. made shells, other are the "standard" shell. Let's talk about the "standard" 
  120. shells.
  121.  
  122. --------------------------------- Just for your information 
  123. -------------------------------------
  124. Home made shells are shells that are made by the sysop that owns the system, 
  125. and it's just running in his system.
  126. -------------------------------------------------------------------------------------------------
  127.  
  128. Like I said there are plenty of shells.You've got:
  129.  
  130. -> shell: Bourne Shell
  131. -> Bash : Bourne Again Shell
  132. -> Cshell: C Shell
  133. -> Tcsh: Technical C Shell
  134. -> Ksh: Kourne Shell
  135. And many others. (I just listed those because it's the ones you can get at 
  136. nether.net)
  137.  
  138. Each shell has their strong and weak points. For example the Cshell allows 
  139. you to type in C commands like if it were normal commands, that means that 
  140. if you type printf Hello it will be the same as echo in other shells(for the 
  141. ones who don't know C language, printf stands for printing in the screen the 
  142. input given).
  143. I won't explain the strong and weak points in each shell, you should be the 
  144. one doing that. Just get them at free shell providers at start exploring.
  145. The only hint I'll give you is that Bash is the best shell for beginners, if 
  146. you want a more powerful shell just go to the C shell. Start with bash, 
  147. explore the system, learn some bash scripting, then start using other 
  148. shells. Talk with your friends that have others shells, ask what they think 
  149. about it, you're getting the idea, aren't you?;)
  150. If you already have one shell and doesn't know which shell is it, just type 
  151. in echo $shell and it will probably be shown your shell's type.
  152. Since this is a quick view, I'll end here. Gonna help you getting a real 
  153. cool shell account.
  154.  
  155.  
  156. -------------------------------------
  157. Getting a Shell Account At Nether.net
  158. -------------------------------------
  159.  
  160. So are you ready to get your first shell account? Of course you are.
  161. The only thing I don't like in nether.net is the offline time that the 
  162. server sometimes stays. So if you can connect to nether.net don't worry, 
  163. since there are plenty of people in that host sometimes he overflows and 
  164. goes offline. Just wait some hours and you probably can go online again.
  165.  
  166. ------ Accessing nether.net ------
  167.  
  168. Step 1. (Getting your terminal emulator ready to roll)
  169.  
  170. Open your telnet program, you can find it in windows directory under the 
  171. name telnet.exe
  172.  
  173.  
  174. Step 2. (Connecting)
  175.  
  176. Now that you are probably looking to the Telnet Window, select the Connect 
  177. menu, and in that menu select Remote System.
  178. It will be shown another box asking you for the hostname, port and term 
  179. type. Fill those fields with the information below.
  180.  
  181. Hostname: nether.net
  182. Port: Telnet (or 23 it's the same)
  183. Term Type: vt100 (it should be already in this value)
  184.  
  185. You wait a little and...
  186.  
  187. ------ Getting the account ------
  188.  
  189. Step 3. (Logging in)
  190.  
  191. Now you should be looking at the nether.net banner. That says:
  192.  
  193.  
  194. Kernel SunOS 5.6 Generic_105181-17 on a sun4d
  195. Welcome to nether.net
  196.  
  197. New to the system?  Login as newuser
  198.  
  199. login:
  200.  
  201. Now like they say use newuser as login. A program called newuser will start, 
  202. helping you  creating an account.
  203.  
  204.  
  205. Step 4. (Customising Keys)
  206.  
  207. After a bunch of crap, the newuser program will ask you to Customise keys. 
  208. It will be asked the delete key (^H) and the break key (^C). What is in 
  209. brackets are the default if you want you can choose any other. The ^H stands 
  210. for the delete key (the one that has the <- symbol on it), and the ^C stands 
  211. for ctrl+c. Attention don't write ^H or ^C just press the keys, and that 
  212. will be the output.
  213.  
  214.  
  215. Step 5. (Selecting Terminal Type)
  216.  
  217. After you customise the keys you'll be asked to enter your terminal type, 
  218. you can select ? and the program will print you all the terminals support by 
  219. it, but you should select vt100 or just press enter. Pressing enter the 
  220. program will assume that your terminal is a dumb terminal. There is no 
  221. problem to select the dumb terminal because you can change it later.
  222.  
  223.  
  224. Step 6. (Personal Data)
  225.  
  226. It will be asked things like your full name, phone number, birth date, sex, 
  227. blablab, your getting the idea. If you want you can just put a . and press 
  228. enter. You can also give fake information, I think that 98% of the users at 
  229. nether.net did that. In the end of all the questions you'll be asked if you 
  230. want to hide the information from other users. Just say yes or no, I suggest 
  231. you to say yes.
  232.  
  233.  
  234. Step 7. (Selecting Shell)
  235.  
  236. Now it will be shown a list with the legal shells, just select one, like I 
  237. said before if you are new to shell accounts choose bash shell.
  238.  
  239.  
  240. Step 8. (Selecting Login)
  241.  
  242. Just select your login, like always 8 chars is the max length.
  243.  
  244.  
  245. Step 9. (Selecting Password)
  246.  
  247. Select a password, it will be asked two times to see if the password is 
  248. correct.
  249. You can change the password later using the passwd command later.
  250.  
  251.  
  252. Step 10. (Accepting Choices)
  253.  
  254. At this time you should be looking to something like:
  255.  
  256. full name: Full Name
  257. loginid: your username password: <suppressed>
  258. address:
  259.         your address if you gave any
  260. telephone: your phone number if you gave any
  261. other e-mail addresses:
  262.         your e-mail address if you gave any
  263. occupation:
  264.         The same here
  265. computers:
  266.         Same
  267. birthdate: Some date sex: Also something here
  268. interests:
  269.    Something
  270. how (did you find out about us):
  271.         How do you find them
  272. Privacy switch on/off
  273. shell: your shell account terminal: your terminal type
  274. erase '^H' kill '^U' interrupt '^C'
  275.  
  276. Type "help" for a list of things you can change.
  277.  
  278. Select thing to change or "done"?
  279.  
  280. Now if you agree with all the data just type done and press enter, or if you 
  281. want to change something just type the you want to change field.
  282.  
  283.  
  284. Step 11. (After You type Done)
  285.  
  286. Now the program is checking if there is already your username, you should be 
  287. seeing a bunch of numbers scrolling, it's normal don't get scared... Now if 
  288. your Login name already exists will be asked another, if there isn't the 
  289. system will encrypt your password, and you'll stay for some time watching a 
  290. bunch of numbers scrolling. After that....
  291.  
  292.  
  293. Step 12. (Congratulations You have a shell account)
  294.  
  295. Yep you've got a shell account, now you should be again in the login 
  296. sequence and your login name is already written just type in the password, 
  297. press enter and have fun.
  298. Remember that you can have many shells has you want. So if you want you can 
  299. login again with newuser but instead of choosing a bash shell choose a 
  300. Cshell and all the others or a shell bash again...
  301.  
  302.  
  303. ------------
  304. The commands
  305. ------------
  306.  
  307. Hi won't talk about of every command that exists in *nix systems, if I did 
  308. that the file would become huge. If you want to a big amount of information 
  309. about commands check the final notes section.
  310. The basic commands are listed below with their function.
  311.  
  312. Syntax: command [switches] -> description
  313.  
  314.  
  315. man [command] -> display the manual entry about the [command] you gave.
  316.  
  317. cd [directory] -> like in DOS it changes your current directory, to go one 
  318. directory up you also use .., if you want to return to your home directory 
  319. just type cd without the [directory] parameter.
  320.  
  321. ls [-al] -> ls makes the same as dir in DOS, it lists every file in the 
  322. directory, the -al is some of the switch you can use. Using this two switch 
  323. the listing will be displayed with hidden files, file permission, group and 
  324. owner. To know all the other switches man ls.
  325.  
  326. cat [file] -> it's the same as the command type in DOS, it displays the 
  327. content of the [file] given.
  328.  
  329. logout -> Logs you out from your shell account.
  330.  
  331. who -> Shows who's online, with information about those users. There are 
  332. programs that make you invisible to the who command, but that's another 
  333. story, probably in another tutorial.
  334.  
  335. ps [-aux] -> ps shows every procedure that is running, something like 
  336. ctrl+alt+del in windows (not to reboot, but to show what's running) but much 
  337. more powerful since it isn't known how we can run a program without being 
  338. display in ps. If you run ps with no switches it will just show your own 
  339. processes, if you use the switch -aux it will list every process that is 
  340. running in the machine.
  341.  
  342. joe [file] -> joe is a text editor, it edits or creates the [file] given. 
  343. Sometimes the shell providers haven't joe but they should have vi (another 
  344. text editor).
  345.  
  346.  
  347. This command should be enough for you to start. Also use man command in the 
  348. commands that we talk to get a bigger and more detailed description about 
  349. it. Good surfing!
  350.  
  351. -----------
  352. Final Notes
  353. -----------
  354.  
  355. Now what you need is a little of practice, and good books to get in touch 
  356. with the commands. One of the best *nix books is UNIX IN A NUTSHELL. You can 
  357. find it in the books section at BSRF WWW page (http://blacksun.box.sk). For 
  358. me, this is the best book about the subject, and since it's free I strongly 
  359. recommend you to get it.
  360. Another good thing is man. For example, if you want to get some information 
  361. about telnet, and how to use it, you just type in:
  362.  
  363.   man telnet
  364.  
  365. And it will be prompt the manual page about telnet.
  366. If you are using a shell in the freeshell server (freeshell.org) you can 
  367. also use the command help without any options. This will call you a menu 
  368. with the options you can call.
  369. And keep in mind that *nix is Case Sensitive so Man, man and MaN or .profile 
  370. and .Profile isn't the same thing.
  371.  
  372.  
  373. Appendixes
  374. ----------
  375. A) Can I run IRC bots on free shell accounts? (by R a v e N)
  376. No!! Unless you intend to be logged into your shell 24 hours a day. Free
  377. shell providers will kill all of your running processes (running programs
  378. in the Windows world) once you log off.
  379.  
  380. B) Are there are other places in which I can get a shell account? (by R a v e N)
  381. Of course! Try http://www.cyberarmy.com/lists